package PolymorphicHomeworkTest2;

public class SalariedEmployee extends Employee{
    private double monthSales;
    public SalariedEmployee(){

    }

    public SalariedEmployee(String name,int month,double monthSales) {
        super(name,month);
        this.monthSales = monthSales;
    }

    public double getMonthSales() {
        return monthSales;
    }

    public void setMonthSales(double monthSales) {
        this.monthSales = monthSales;
    }

    public double getSalary(int month){
        if(super.getMonth() == month){
            this.monthSales += 100;
        }
        return this.monthSales;
    }

}
